package com.etc.controller;


import com.etc.entity.Sss;
import com.etc.service.Impl.SssServiceImpl;
import com.etc.service.SssService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 武晓春
 * @since 2021-03-16
 */

@Controller
public class SssController {


    @Autowired
    private SssService sssService;

    @GetMapping("/toIndex")
    public  String  index( ) {
        return "index";
    }
    @GetMapping("/findAll")
    @ResponseBody
    public  List<Sss>  findAll() {
        List<Sss> list = sssService.list();
        return list;
    }
}
